using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

/*
 

  *
 ***
*****
 ***
  *

边长是3
行列数就是5

*/

namespace Dome
{
    class Demo6
    {
        public static void Lingxing()
        {
            Console.WriteLine("请输入要输出的菱形上半长度");
            int longer = Exception(true);
            for (int m = 1; m <= longer; m++)
            {
                for (int j = 1; j <= longer - m; j++)
                {
                    Console.Write(" ");
                }
                for (int j = 1; j <= 2 * m - 1; j++)
                {
                    Console.Write("*");
                }
                Console.WriteLine();

            }
            for (int m = longer - 1; m >= 1; m--)
            {
                for (int j = 1; j <= longer - m; j++)
                {
                    Console.Write(" ");
                }
                for (int j = 1; j <= 2 * m - 1; j++)
                {
                    Console.Write("*");
                }
                Console.WriteLine();

            }
        }
    }
}